package com.zhuhjay.service.imchat.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author ZhuHJay
 * @since 2023-07-11
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("chat_message")
@ApiModel(value = "ChatMessage对象", description = "")
public class ChatMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("聊天信息主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("发送消息的用户")
    private Integer userId;

    @ApiModelProperty("消息到达的聊天室")
    private Integer roomId;

    @ApiModelProperty("消息内容")
    private String content;

    @ApiModelProperty("回复消息id")
    private Long replyId;

    @ApiModelProperty("与回复的消息间隔多少条")
    private Integer gapCount;

    @ApiModelProperty("消息状态(0:删除,1:正常)")
    private Integer status;

    @ApiModelProperty("发送时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
